<?php

namespace common\models;

use Yii;
use \common\models\base\ApiType as BaseApiType;

/**
 * This is the model class for table "api_type".
 */
class ApiType extends BaseApiType
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return array_replace_recursive(parent::rules(),
	    [
            [['type_name', 'disable', 'created_at', 'updated_at'], 'required'],
            [['created_at', 'updated_at'], 'integer'],
            [['type_name'], 'string', 'max' => 255],
            [['disable'], 'string', 'max' => 1],
//            [['lock'], 'default', 'value' => '0'],
//            [['lock'], 'mootensai\components\OptimisticLockValidator']
        ]);
    }
	
}
